package com.ryan.quartz.temp.decorator;

/**
 * @author Rayn on 2017/10/29.
 * @email liuwei412552703@163.com.
 */
public class Mocha extends CondimentDecorator {

    protected Beverage beverage;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    /**
     *
     * @return
     */
    @Override
    public int getSize() {
        return 10;
    }

    /**
     * 获取描述
     */
    @Override
    public String getDescription() {
        return beverage.getDescription() + " --> Mocha Product.";
    }

    /**
     *
     * @return
     */
    @Override
    public double cost() {
        return 0.2 + beverage.cost();
    }
}
